<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!-- 添加C标签 -->
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>"> 
    <title>首页</title>   
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!-- 引用常用的js插件的jsp页面 -->
	<jsp:include page="../common.jsp"></jsp:include>
		
	<script type="text/javascript">
	$(function(){
	    //Class选择器	
	    $(".Connect a").click(function(){
	        var title=$(this).text();
	        var url=$(this).attr("rel");
	        OpenTab(title,url);
	        return false;    //使超链接的单击事件失效
	    });
	    function OpenTab(title, url){
		    /**
				    如果这个标题的标签存在，则选择该标签
				    否则添加一个标签到标签组
		    */
		    if($("#center").tabs('exists', title)){
		        $("#center").tabs('select', title);
		    }else{
		        $("#center").tabs('add',{
		            title: title,
		            content: createTabContent(url),
		            closable: true,
		        });
		    }    	    
	    }
    /* 生成标签内容 */
	function createTabContent(url){
		return '<iframe style="width:100%;height:99%;" scrolling="auto" frameborder="0" src="' + url + '"></iframe>';
	}	
	 $("#tabs").tabs({//关闭事件
        onClose:function(title){
            removeItem(title);
        }
     });
  });
  
  		
	//显示东区
	 function showEast(){
		 $('#cc').layout('add',{
		    region: 'east',
		    width: 180,
		    title: '东区',
		    split: true,
		    tools: [{
				iconCls:'icon-add',
				handler:function(){alert('add')}
		    },{
				iconCls:'icon-remove',
				handler:function(){alert('remove')}
		    }]
		});
    }	
	
	//折叠南区
	function foldSouth(){
		$('#cc').layout();
		// collapse the west panel
		$('#cc').layout('collapse','south');
	 };		 	 	  
  
	 //登出
	 function logout(){
	   
	   
	 }
	
	</script>
	
  </head>
 <!-- 布局（layout）是有五个区域（北区 north、南区 south、东区 east、西区 west 和中区 center）的容器 -->
  <body>
    <div id="cc" class="easyui-layout" fit="true">
	    <div data-options="region:'north',title:'北区',split:true" style="height:66px;">
	      <input type="button" id="east" value="显示东区" onclick="showEast()"> 
	      <input type="button" id="south" value="折叠南区" onclick="foldSouth()">
	                                                   <!-- 靠右 -->
	    <a id="btn" href="" class="easyui-linkbutton" style=" float:right; margin-right:20px" data-options="iconCls:'icon-search'">登出</a>                                                
	    <!--    <input type="button" id="logout" value="登出" style=" float:right; margin-right:20px"   onclick="logout()">
	    -->
	    </div>
        <div data-options="region:'west',title:'西区',split:true" style="width:200px;">
	        <div id="aa" class="easyui-accordion" fit="true"> 
	                                            <!--iconCls: 图标 -->  
			<!-- <div title="面版1" data-options="iconCls:'icon-save',selected:true" style="overflow:auto;padding:10px;">   
			      <a href="login/jumpUserAss.htm" rel="">111</a>
			    </div>
			   -->	
			      <!--动态路径方法 -->	    			    
			      <c:forEach var="list" items="${pathInfo}">
				      <c:if test="${list.pathCode.length()==4}">
				          <div title="${list.pathName}" style="overflow:auto;padding:10px;"> 
				            <div class="Connect">	                    
		                      <c:forEach var="list3" items="${pathInfo}">
		                          <c:if test="${list3.pathCode.length()==8 && list3.pathCode.substring(0,4).equals(list.pathCode)}">
		                             <a href="javascript:void(0);" rel="${list3.pathUri}">${list3.pathName}</a>
		                            <br/>
		                          </c:if>
		                      </c:forEach>
		                    </div>	
			             </div> 
				      </c:if>	                  			       
			      </c:forEach>			    			     
		    </div>                          
        </div>
                                                          
	    <div data-options="region:'center'">
	      <div id="center" class="easyui-tabs" fit="true"></div>
	    </div>                                                                <!-- url加载文件  -->  
        <div data-options="region:'south',title:'南区 ',split:true,href:'testData/datagrid_data1.json'" style="height:100px;"></div>
   <!-- <div data-options="region:'east',title:'东区',split:true" style="width:50px;"></div>-->
   </div>
  </body>

  
  
</html>
